/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.hotel.test.service.persistence;

import com.hotel.test.model.RomType;

import com.liferay.portal.service.persistence.BasePersistence;

/**
 * The persistence interface for the rom type service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author Vien-IT
 * @see RomTypePersistenceImpl
 * @see RomTypeUtil
 * @generated
 */
public interface RomTypePersistence extends BasePersistence<RomType> {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link RomTypeUtil} to access the rom type persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
	 */

	/**
	* Caches the rom type in the entity cache if it is enabled.
	*
	* @param romType the rom type
	*/
	public void cacheResult(com.hotel.test.model.RomType romType);

	/**
	* Caches the rom types in the entity cache if it is enabled.
	*
	* @param romTypes the rom types
	*/
	public void cacheResult(
		java.util.List<com.hotel.test.model.RomType> romTypes);

	/**
	* Creates a new rom type with the primary key. Does not add the rom type to the database.
	*
	* @param romId the primary key for the new rom type
	* @return the new rom type
	*/
	public com.hotel.test.model.RomType create(long romId);

	/**
	* Removes the rom type with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param romId the primary key of the rom type
	* @return the rom type that was removed
	* @throws com.hotel.test.NoSuchRomTypeException if a rom type with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hotel.test.model.RomType remove(long romId)
		throws com.hotel.test.NoSuchRomTypeException,
			com.liferay.portal.kernel.exception.SystemException;

	public com.hotel.test.model.RomType updateImpl(
		com.hotel.test.model.RomType romType, boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the rom type with the primary key or throws a {@link com.hotel.test.NoSuchRomTypeException} if it could not be found.
	*
	* @param romId the primary key of the rom type
	* @return the rom type
	* @throws com.hotel.test.NoSuchRomTypeException if a rom type with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hotel.test.model.RomType findByPrimaryKey(long romId)
		throws com.hotel.test.NoSuchRomTypeException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the rom type with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param romId the primary key of the rom type
	* @return the rom type, or <code>null</code> if a rom type with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hotel.test.model.RomType fetchByPrimaryKey(long romId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the rom types where roomName = &#63;.
	*
	* @param roomName the room name
	* @return the matching rom types
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hotel.test.model.RomType> findByRoomName(
		java.lang.String roomName)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the rom types where roomName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param roomName the room name
	* @param start the lower bound of the range of rom types
	* @param end the upper bound of the range of rom types (not inclusive)
	* @return the range of matching rom types
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hotel.test.model.RomType> findByRoomName(
		java.lang.String roomName, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the rom types where roomName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param roomName the room name
	* @param start the lower bound of the range of rom types
	* @param end the upper bound of the range of rom types (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching rom types
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hotel.test.model.RomType> findByRoomName(
		java.lang.String roomName, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first rom type in the ordered set where roomName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param roomName the room name
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching rom type
	* @throws com.hotel.test.NoSuchRomTypeException if a matching rom type could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hotel.test.model.RomType findByRoomName_First(
		java.lang.String roomName,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hotel.test.NoSuchRomTypeException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last rom type in the ordered set where roomName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param roomName the room name
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching rom type
	* @throws com.hotel.test.NoSuchRomTypeException if a matching rom type could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hotel.test.model.RomType findByRoomName_Last(
		java.lang.String roomName,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hotel.test.NoSuchRomTypeException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the rom types before and after the current rom type in the ordered set where roomName = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param romId the primary key of the current rom type
	* @param roomName the room name
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next rom type
	* @throws com.hotel.test.NoSuchRomTypeException if a rom type with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public com.hotel.test.model.RomType[] findByRoomName_PrevAndNext(
		long romId, java.lang.String roomName,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.hotel.test.NoSuchRomTypeException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the rom types.
	*
	* @return the rom types
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hotel.test.model.RomType> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the rom types.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of rom types
	* @param end the upper bound of the range of rom types (not inclusive)
	* @return the range of rom types
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hotel.test.model.RomType> findAll(int start,
		int end) throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the rom types.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of rom types
	* @param end the upper bound of the range of rom types (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of rom types
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hotel.test.model.RomType> findAll(int start,
		int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the rom types where roomName = &#63; from the database.
	*
	* @param roomName the room name
	* @throws SystemException if a system exception occurred
	*/
	public void removeByRoomName(java.lang.String roomName)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the rom types from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of rom types where roomName = &#63;.
	*
	* @param roomName the room name
	* @return the number of matching rom types
	* @throws SystemException if a system exception occurred
	*/
	public int countByRoomName(java.lang.String roomName)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of rom types.
	*
	* @return the number of rom types
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the bookings associated with the rom type.
	*
	* @param pk the primary key of the rom type
	* @return the bookings associated with the rom type
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hotel.test.model.Booking> getBookings(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the bookings associated with the rom type.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the rom type
	* @param start the lower bound of the range of rom types
	* @param end the upper bound of the range of rom types (not inclusive)
	* @return the range of bookings associated with the rom type
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hotel.test.model.Booking> getBookings(long pk,
		int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the bookings associated with the rom type.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the rom type
	* @param start the lower bound of the range of rom types
	* @param end the upper bound of the range of rom types (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of bookings associated with the rom type
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<com.hotel.test.model.Booking> getBookings(long pk,
		int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of bookings associated with the rom type.
	*
	* @param pk the primary key of the rom type
	* @return the number of bookings associated with the rom type
	* @throws SystemException if a system exception occurred
	*/
	public int getBookingsSize(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the booking is associated with the rom type.
	*
	* @param pk the primary key of the rom type
	* @param bookingPK the primary key of the booking
	* @return <code>true</code> if the booking is associated with the rom type; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsBooking(long pk, long bookingPK)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the rom type has any bookings associated with it.
	*
	* @param pk the primary key of the rom type to check for associations with bookings
	* @return <code>true</code> if the rom type has any bookings associated with it; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsBookings(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;
}